]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: popModal before fading out
authorDan Winship <danw@gnome.org>
Tue, 15 Mar 2011 20:12:40 +0000 (16:12 -0400)
committerDan Winship <danw@gnome.org>
Mon, 21 Mar 2011 18:26:08 +0000 (14:26 -0400)
This lets the user start typing in the newly-selected window right
away, without any characters possibly getting eaten during the
animation.

https://bugzilla.gnome.org/show_bug.cgi?id=644857

js/ui/altTab.js
js/ui/ctrlAltTab.js

index 46ab9a325444d79ab3a2da4f48c4436400411d82..54a4567066e93d4d1a16d5be0faa35bbfcc9f7e4 100644 (file)
@@ -376,7 +376,15 @@ AltTabPopup.prototype = {
         this.destroy();
     },
 
+    _popModal: function() {
+        if (this._haveModal) {
+            Main.popModal(this.actor);
+            this._haveModal = false;
+        }
+    },
+
     destroy : function() {
+        this._popModal();
         if (this.actor.visible) {
             Tweener.addTween(this.actor,
                              { opacity: 0,
@@ -392,8 +400,7 @@ AltTabPopup.prototype = {
     },
 
     _onDestroy : function() {
-        if (this._haveModal)
-            Main.popModal(this.actor);
+        this._popModal();
 
         if (this._thumbnails)
             this._destroyThumbnails();
index ff926a47684d64a0b633887d35ceb5aa8759db81..65b0a804671023ca3e505a4a70d19e0359eced9c 100644 (file)
@@ -281,6 +281,7 @@ CtrlAltTabPopup.prototype = {
     },
 
     _onDestroy : function() {
+        this._popModal();
         if (this._keyPressEventId)
             this.actor.disconnect(this._keyPressEventId);
         if (this._keyReleaseEventId)